home *** CD-ROM | disk | FTP | other *** search
- .Na "DBCOUNT"
- .Aa
- .Fu
- Return the number of rows affected by a \*N command.
- .Ih "rows, returning the number affected by a command"
- .Sy
- .Sf "DBINT DBCOUNT(dbproc)"
- .Sp "DBPROCESS" "*dbproc"
- .Co
- .Bl
- Once the results of a command have been processed, you can call
- .I "DBCOUNT()"
- to find out how many rows were affected by the command. For example, if
- a SELECT
- command was sent to \*S and you have read all the rows by calling
- .I "dbnextrow()"
- until it returned NO_MORE_ROWS, you
- can call this macro to find out how many rows were
- retrieved.
- .Bl
- If the current command is one that doesn't return rows,
- (\f2e.g.,\f1 a DELETE), you can call
- .I "DBCOUNT()"
- immediately after
- .I "dbresults()."
- .Bz
- .Pa
- .Pi dbproc
- A pointer to the DBPROCESS structure that provides the connection
- for a particular front-end/\*S process. It contains all the
- information that \*L uses to manage communications and data between the
- front end and \*S.
- .in -.375i
- .Re
- .mc |
- .br
- The number of rows affected by the command, or -1.
- \f2DBCOUNT()\f1 will return -1 if any of the following are true:
- .Bl
- The \*N command fails for any reason, such as a syntax error.
- .Bl
- The command is one that \f2never\f1 affects rows, such as a PRINT command.
- .Bl
- The DBNOCOUNT option is on.
- .Bz
- .mc
- .Sa
- dbnextrow,
- dbresults,
- options
-